<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <style>
            #canvas{
                border:1px solid #000;
            }
        </style>
    </head>
    <body>
        <canvas id="canvas" width="800" height="800"></canvas>

        <script>
            /** @type {HTMLCanvasElement} */
            const canvas = document.querySelector("#canvas");
            const ctx = canvas.getContext("2d");
            
            ctx.beginPath();
            ctx.moveTo(50,150);
            let curveControl = [150,0];
            let curveEnd = [310,180]
            ctx.quadraticCurveTo(curveControl[0],curveControl[1],curveEnd[0],curveEnd[1])
            ctx.stroke()

            ctx.beginPath();
            ctx.moveTo(100,350);
            let curveControl1 = [90,150];
            let curveControl2 = [210,110];
            let curveEnd2 = [510,300]
            ctx.bezierCurveTo(curveControl1[0],curveControl1[1],curveControl2[0],curveControl2[1],curveEnd2[0],curveEnd2[1])
            ctx.closePath()
            ctx.fillStyle='red'
            ctx.shadowBlur=30
            ctx.shadowColor='red'
            ctx.fill()
        </script>
    </body>
</html>
